Skip to content

Avoid server error in FlexibleImageWidget validation#4381

Merged
koopmant merged 5 commits into
mainfrom
flexible-image-widget-validation
Oct 28, 2025
Merged

Avoid server error in FlexibleImageWidget validation#4381
koopmant merged 5 commits into
mainfrom
flexible-image-widget-validation

Conversation

@koopmant
Copy link
Copy Markdown
Contributor

@koopmant koopmant commented Oct 24, 2025

Fix error in FlexibleImageWidget.decompress() due to unexpected value. This now properly raises a "field required" validation error on the field.

The possible data returned from the possible widgets of FlexibleImageWidget was not completely tested. This adds a test where we extract the form data from the response of the flexible image widget for each of the possible options the user can select.

Closes #4312

@koopmant koopmant requested a review from jmsmkn as a code owner October 24, 2025 14:50
@koopmant koopmant marked this pull request as draft October 24, 2025 14:52
@koopmant koopmant force-pushed the flexible-image-widget-validation branch from 30f4e6a to ee8b195 Compare October 24, 2025 15:18
@koopmant koopmant force-pushed the flexible-image-widget-validation branch from ee8b195 to 8f729e8 Compare October 24, 2025 15:21
@koopmant koopmant marked this pull request as ready for review October 24, 2025 16:36
@koopmant koopmant linked an issue Oct 24, 2025 that may be closed by this pull request
@jmsmkn
Copy link
Copy Markdown
Member

jmsmkn commented Oct 27, 2025

Does this solve the “%(value)s” is not a valid UUID. error?

Closes to #4312

What does this mean?

@koopmant
Copy link
Copy Markdown
Contributor Author

Does this solve the “%(value)s” is not a valid UUID. error?

Yes.

Closes to #4312

What does this mean?

Oops; I had "Related to" there initially.

Comment thread app/grandchallenge/cases/widgets.py Outdated
Comment thread app/grandchallenge/cases/widgets.py
Comment thread app/grandchallenge/cases/widgets.py
Copy link
Copy Markdown
Member

@jmsmkn jmsmkn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@koopmant koopmant merged commit 67c0733 into main Oct 28, 2025
10 checks passed
@koopmant koopmant deleted the flexible-image-widget-validation branch October 28, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FlexibleImageWidget allows submitting without a selected image

2 participants